<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link th:href="@{/erp/assets/css/bootstrap.min.css}" rel="stylesheet"/>
    <link rel="stylesheet" th:href="@{/erp/css/style.css}"/>
    <link th:href="@{/erp/assets/css/codemirror.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace.min.css}"/>
    <link rel="stylesheet" th:href="@{/erp/font/css/font-awesome.min.css}"/>
    <link th:href="@{/erp/assets/css/bootstrap.min.css}" rel="stylesheet"/>
    <link rel="stylesheet" th:href="@{/erp/css/style.css}"/>
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace.min.css}"/>
    <link rel="stylesheet" th:href="@{/erp/assets/css/font-awesome.min.css}"/>
    <link rel="stylesheet" th:href="@{/erp/Widget/zTree/css/zTreeStyle/zTreeStyle.css}" type="text/css">
    <link th:href="@{/erp/Widget/icheck/icheck.css}" rel="stylesheet" type="text/css"/>
    <!--[if lte IE 8]>
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace-ie.min.css}"/>
    <![endif]-->
    <script th:src="@{/erp/js/jquery-1.9.1.min.js}"></script>
    <script th:src="@{/erp/assets/js/bootstrap.min.js}"></script>
    <script th:src="@{/erp/assets/js/typeahead-bs2.min.js}"></script>
    <script th:src="@{/erp/assets/js/jquery.dataTables.min.js}"></script>
    <script th:src="@{/erp/assets/js/jquery.dataTables.bootstrap.js}"></script>
    <script th:src="@{/erp/assets/layer/layer.js}" type="text/javascript"></script>
    <script th:src="@{/erp/assets/laydate/laydate.js}" type="text/javascript"></script>
    <title>入库添加</title>
</head>
<body>
<!--入库添加先跳的选择交接单的界面-->
<div class="add_menber" id="add_handover">
    <ul class=" page-content">
        <div class="Operate_cont clearfix">
            <table class="table table-striped table-bordered table-hover" id="handover-table">
                <thead>
                <tr>
                    <th width="25"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></th>
                    <th width="70">序号</th>
                    <th width="100">交接单号</th>
                    <th width="100">订单编号</th>
                    <th width="100">入库库名</th>
                    <th width="100">入库数量</th>
                    <th width="100">交接单创建时间</th>
                    <th width="100">交接人</th>
                    <th width="100">交接单类型</th>
                    <th width="100">备注</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
        </div>
    </ul>
</div>

<!--交接单列表-->
<script>
    $(function () {
        $('#handover-table').DataTable({
            serverSide: true,   //开始服务器分页
            searching: false,
            aoColumnDefs: [
                {"orderable": false, "aTargets": ['_all']}// 制定列不参与排序
            ],
            ajax: {
                url : '[[@{/handover/all}]]',
                type : 'post',
                data : function (d) {
                    //获取分页信息
                    var searchParams= {
                        start : d.start/10+1,
                        length : d.length,
                    };
                    var data = $.param(searchParams);
                    return data;
                }
            },
            columns : [
                {"data": "id" , "createdCell": function (td, cellData, rowData, row, col) {
                        $(td).empty().append('<label><input type="checkbox" class="ace"><span class="lbl"></span></label>');
                    }},
                {"data": "id" , "createdCell": function (td, cellData, rowData, row, col) {
                        $(td).text(row+1);
                    }},
                { "data": "id" },
                { "data": "orderId" },
                { "data": "wareName" },
                { "data": "num" },
                { "data": "handoverDate" },
                { "data": "head" },
                { "data": "type" , "createdCell": function (td, cellData, rowData, row, col) {
                    if (cellData == "1"){
                        $(td).text("采购交接单");
                    } else {
                        $(td).text("生产交接单");
                    }
                    }},
                { "data": "remake" },
            ]
        } );
    })
</script>
</body>
</html>

